#ifndef _TABLESTRUCT_H_
#define _TABLESTRUCT_H_

#include "stdafx.h"

class CTableStruct :	public ITableStruct,
						public CUnknownImp
{
public:
	CTableStruct();
	virtual ~CTableStruct();

	BEGIN_STDCOM_MAP
		STDCOM_INTERFACE_ENTRY(ITableStruct)
		STDCOM_INTERFACE_ENTRY_UNKNOWN_(ITableStruct)
	END_STDCOM_MAP

public:
	std_method(SetRecord)(const FieldSturct& field);
	std_method(GetRecord)(UINT loop, FieldSturct* field);
	std_method(GetAllRecord)(FieldSturct fields[], UINT Count);
	std_method(GetFieldsCount)(UINT &count);
	std_method(GetTableName)(LPSTR name);
	std_method(SetTableName)(LPCSTR name);
	std_method(SetKeyValue)(LPCSTR name, UINT op);
	std_method_(UINT, IsExist)();
	std_method_(UINT, GetOp)();
private:
	string	m_strTableName;
	UINT	m_uOp;
	UINT	m_uSave;
	Table	m_vecTableFields;
};
#endif

